<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of BServiceAppForService
 *
 * @author jianfeng
 */
class BServiceAppForService extends BServiceApp {

    protected $rootAuthItem = null;

    //put your code here
    public function doOperation($operationName, $args) {
        ;
    }

    public function createNewService() {
        /*
         * tasks for create new service:
         * create workteam,servedteam
         * add current user into workteam
         * create rootAuthItem for workteam,servedTeam
         * create ServiceManager authitem for workTeam rootAuthItem
         * add currentUser into ServiceManager
         */
        $service = $this->serviceContainer;
        $service->workTeam = new BServiceTeam(BServiceTeam::NEWSERVICETEAM, $workTeamConfig);
        $service->servedTeam = new BServiceTeam(BServiceTeam::NEWSERVICETEAM, $servedTeamConfig);
        $this->rootAuthItem = new BAuthItem(BAuthItem::ROOTAUTHITEM,$config);

        $this->rootAuthItem.addMember($userId);

        //    array_push($service->friendTeams, $team->createNewTeam($friendTeamconfig));
    }

    public function loadService() {

    }

    public function setServiceName($name) {
        
    }

}

?>
